#pragma once

#include <typedef.h>
//
#include <mission_list.hpp>
#include <semaphore.hpp>
#include <task_run.hpp>

class MissionRun : public TaskRun
{
public:
	MissionRun();
	virtual ~MissionRun();
	static MissionRun* Instance();

	int Create(MissionList* missionList);
	void Abort(int id);

protected:
	virtual void Run(void* arg);

private:
	Semaphore m_SemRw;
	int m_SeqId;
	std::map<int, MissionList*> m_MisMap;
};